# -*- coding: utf-8 -*-
# בש״ד
#
# Miramar CMS for Django - Part of the Cuba Libre Project
# Copyright (C) 2009, Joshua "jag" Ginsberg <jag@flowtheory.net>
# 
# Por mi amor, que inspira a mi cada respiración y que echa de Cuba
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import django.dispatch
from django.utils.translation import ugettext_lazy as _

PAGEVERSION_PUBLISHED = (0, _(u'Published'))
PAGEVERSION_APPROVED = (1, _(u'Approved for publishing'))
PAGEVERSION_UNPUBLISHED = (2, _(u'Unpublished'))
PAGEVERSION_CREATED = (3, _(u'Created'))
PAGEVERSION_UPDATED = (4, _(u'Modified'))

PAGE_CREATED = (1000, _(u'Created'))
PAGE_RENAMED = (1001, _(u'Renamed'))
PAGE_UPDATED = (1002, _(u'Updated'))


EVENT_TYPES = [
    PAGEVERSION_PUBLISHED,
    PAGEVERSION_APPROVED,
    PAGEVERSION_UNPUBLISHED,
    PAGEVERSION_CREATED,
    PAGEVERSION_UPDATED,
    PAGE_CREATED,
    PAGE_RENAMED,
    PAGE_UPDATED,
]

cms_event = django.dispatch.Signal(providing_args=['event', 'actor',
                                                   'before', 'after'])
